//============================================================================
// Name        : csiena
// Author      : Josh Lospinoso
// Copyright   : MIT License
// Description : Austere, limited implementation of the R package RSiena in
//				 C++. Used for fast maximum likelihood and method of moments
//				 estimation of stochastic actor oriented models (SAOMs)
//				 without any frills or user experience niceties.
//============================================================================

#ifndef GLOBALS_H_
#define GLOBALS_H_

#include <math.h>
#include <iostream>
#include <string>
#include <fstream>
#include <string.h>
#include "stdio.h"
#include <cstdlib>
#include <float.h>

//TODO: Get some sort of profiler working
//#include <google/profiler.h>
#define GAMMA_LENGTH 2
#define BETA_LENGTH 4
#define THETA_LENGTH (GAMMA_LENGTH+BETA_LENGTH)
#define PERMUTE_MAX 25
#define DERIV_MAX DBL_MAX
// Proposal probabilities here
#define PERMUTE_PROPOSAL 0.3
#define INSERTD_PROPOSAL 0.15
#define DELETED_PROPOSAL 0.15
#define INSERTCCP_PROPOSAL .15
#define DELETECCP_PROPOSAL .15
#define INSERTEC_PROPOSAL .05
#define DELETEEC_PROPOSAL .05
#define MIN_DERIVATIVE .0005
#define MAX_DERIVATIVE 10
#define MIN_GAMMA .0001
#define MAX_GAMMA .2

// If you want to diagnose proposal results, uncomment this line:
// #define PRINT_PROPOSAL_RESULTS 1

// Comment this out for non-CUDA environments:
// #define CUDA 1
// Comment this out for non=Boost (i.e. not multi-processor)
//#define BOOST_THREADS 4
/*	Additional headers for CUDA and Boost.
//	**Make sure to add to the library:
//	-lgsl -lgslcblas -lcuda -lcudart -lboost -lboost_thread-mt
//  **And to the library path:
//	-L/usr/local/boost_1_45_0/stage/lib
//	**And to your include path:
//  -I/usr/local/boost_1_45_0/
//	when compiling.
//
//  When running, make sure that your environment has e.g.
// /usr/local/boost_1_45_0/stage/lib:/user/local/cuda/lib
// on the DYLD_LIBRARY_PATH variable.
*/
#ifndef CUDA
	#include <gsl/gsl_linalg.h>
	#ifdef BOOST_THREADS
	#include <boost/thread.hpp>
	#endif /* BOOST_THREADS */
#else
	#include <cula.h>
	#include <cuda.h>
#endif /* CUDA */
#endif /* GLOBALS_H_ */
